<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>仲裁</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../css/oksub.css">
<script type="text/javascript" src="../../lib/loading/okLoading.js"></script>
</head>
<body>
<div class="ok-body"> 
  <!--form表单-->
  <form class="layui-form layui-form-pane ok-form">
    <blockquote class="layui-elem-quote">
      <p>添加材料</p>
    </blockquote>
    <div class="layui-form-item layui-form-item01">
      <label class="layui-form-label">材料名称</label>
      <div class="layui-input-block">
        <input type="text" name="title" placeholder="请输入文章标题" autocomplete="off" class="layui-input" lay-verify="required">
      </div>
    </div>
    <div class="layui-form-item layui-form-text">
      <label class="layui-form-label">证明内容</label>
      <div class="layui-input-block">
        <textarea name="content" placeholder="请输入文章内容" class="layui-textarea" lay-verify="required"></textarea>
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">材料附件</label>
      <div class="layui-input-block">
        <input type="file" id="licensePic" class="layui-input" value="上传的文件" accept=".jpg,.jpeg,.png,.ico" style="padding-top: 6px;color: #666;">
      </div>
    </div>
    <div style="clear: both"></div>
    <div class="layui-form-item" style="width: 100%;float: left;margin-top: 30px;">
      <div class="layui-input-block" style="text-align: center;margin-left: 0px;">
		<a class="layui-btn" href="user-wdzszzs.html">立即提交</a>
        <!--<button class="layui-btn el-button">立即提交</button>-->
        <button class="layui-btn layui-btn-primary el-button">重置</button>
      </div>
    </div>
  </form>
</div>
<!--js逻辑--> 
<script src="../../lib/layui/layui.js"></script> 
<script>
	layui.use(["form", "okUtils", "okLayer"], function () {
		let form = layui.form;
		let okUtils = layui.okUtils;
		let okLayer = layui.okLayer;
		okLoading.close();
		form.on("submit(addArticle)", function (data) {
			okUtils.ajax("/article/addArticle", "post", data.field, true).done(function (response) {
				okLayer.greenTickMsg(response.msg, function () {
					parent.layer.close(parent.layer.getFrameIndex(window.name));
				});
			}).fail(function (error) {
				console.log(error)
			});
			return false;
		});
	});
</script>
</body>
</html>
